package com.ltkj.order.mapper;

import com.ltkj.order.domain.TicOrder;
import com.ltkj.order.domain.dto.TicOrderQueryDTO;
import com.ltkj.order.domain.dto.TicVenuesOrderQueryDTO;
import com.ltkj.order.domain.vo.*;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 订单Mapper接口
 * 
 * @author ruoyi
 * @date 2023-09-01
 */
public interface TicOrderMapper 
{
    /**
     * 查询订单
     * 
     * @param orderId 订单主键
     * @return 订单
     */
    public TicOrder selectTicOrderByOrderId(Long orderId);

    /**
     * 查询订单列表
     * 
     * @param ticOrder 订单
     * @return 订单集合
     */
    public List<TicOrder> selectTicOrderList(TicOrder ticOrder);

    /**
     * 新增订单
     * 
     * @param ticOrder 订单
     * @return 结果
     */
    public int insertTicOrder(TicOrder ticOrder);

    /**
     * 修改订单
     * 
     * @param ticOrder 订单
     * @return 结果
     */
    public int updateTicOrder(TicOrder ticOrder);

    /**
     * 删除订单
     * 
     * @param orderId 订单主键
     * @return 结果
     */
    public int deleteTicOrderByOrderId(Long orderId);

    /**
     * 批量删除订单
     * 
     * @param orderIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTicOrderByOrderIds(Long[] orderIds);

    void cancleOrderByOrderIds(@Param("orderIds")Long[] orderIds);

    List<TicOrderPageVo> selectTicOrderListNew(TicOrderQueryDTO queryDTO);
    List<TicVenuesOrderPageVo> venuesList(TicVenuesOrderQueryDTO queryDTO);
    OrderVenuesDetailsVo venuesDetails(@Param("orderId") Long orderId);

    void updateStockCount(@Param("ticketId") Long ticketId,@Param("ticketCount") Integer ticketCount,@Param("stockDate") Date stockDate);
    TicVenuesPeriodVO searchTicVenuesPeriodVO(Long periodId);

    void updateVenuesPeriodCount( @Param("periodId")Long periodId,@Param("ticketCount") Integer ticketCount);
    void updateAddVenuesPeriodCount( @Param("periodId")Long periodId,@Param("ticketCount") Integer ticketCount);

    Integer selectStockCount(@Param("ticketId")Long ticketId,@Param("stockDate") Date stockDate);

    String selectTicketAuth(@Param("ticketId")Long ticketId);

    TicOrderResuleVo selectTicketActivityByTicketId(@Param("ticketId")Long ticketId,@Param("ticConfigId") Long ticConfigId);

    TicOrderResuleVo selectTicketSenciByTicketId(@Param("ticketId")Long ticketId,@Param("ticConfigId") Long ticConfigId);

    TicOrder orderPayDetail(@Param("wxOrdernum") String wxOrdernum);

    void updateTicOrderStatus(@Param("orderId") Long orderId);

    void updateStockCountByStockDate(@Param("ticketId")Long ticketId,@Param("ticketCount") Integer ticketCount,@Param("stockDate")  Date stockDate);

    String selectTicketActivityAuth(@Param("ticketId")Long ticketId);

    UserAuthVo selectUserAuth(@Param("userId")Long userId);
    String selectOtherBaseByTicOtherBaseId(Long ticOtherBaseId);

    String selectVenusTicketAuth(@Param("ticketId")Long ticketId);
    int queryorderBy(@Param("ticketId")Long ticketId,@Param("orderTicketType")String orderTicketType,
                     @Param("ticVenuesPeriodId")Long ticVenuesPeriodId,@Param("ticketStatus")String ticketStatus,@Param("userId")Long userId);
    int queryorderByTicketId(@Param("ticketId")Long ticketId,@Param("orderTicketType")String orderTicketType,
                     @Param("ticketDate")Date ticketDate,@Param("ticketStatus")String ticketStatus,
                             @Param("userId")Long userId);
}
